package com.qingxin.wuye.repertory.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
/**
 * 物品管理
 * @author hezhiwei
 *
 */
@Entity
@Table(name = "res_manage")
public class ResManage extends com.qingxin.sys.entity.BaseEntity implements
		java.io.Serializable {

	private static final long serialVersionUID = 3893413858553271692L;
	private String resid;
	private String typeid;//物品类型
	private String resDm;//物品代码
	private String resTm;//物品条码
	private String resName;//物品名称
	private String pinyin;//拼音
	private String model;//型号
	private String unit;//单位
	private String sccj;//生产单位
	private String remark;
	private Integer stockMax;//库存上限
	private Integer stockMin;//库存下限
	private Double inPrice;//默认入库价格
	private Double outPrice;//默认出库价格
	private Double middlePrice;//默认平均价
	private String createBy;
	private Date createTime;
	
	private String typeName;

	// Constructors

	/** default constructor */
	public ResManage() {
	}

	/** minimal constructor */
	public ResManage(String resid) {
		this.resid = resid;
	}

	/** full constructor */
	public ResManage(String resid, String typeid, String resDm, String resTm,
			String resName, String pinyin, String model, String unit,
			String sccj, String remark, Integer stockMax, Integer stockMin,
			Double inPrice, Double outPrice, Double middlePrice,
			String createBy, Date createTime) {
		this.resid = resid;
		this.typeid = typeid;
		this.resDm = resDm;
		this.resTm = resTm;
		this.resName = resName;
		this.pinyin = pinyin;
		this.model = model;
		this.unit = unit;
		this.sccj = sccj;
		this.remark = remark;
		this.stockMax = stockMax;
		this.stockMin = stockMin;
		this.inPrice = inPrice;
		this.outPrice = outPrice;
		this.middlePrice = middlePrice;
		this.createBy = createBy;
		this.createTime = createTime;
	}
	
	
	public ResManage(String resid, String typeid, String resDm, String resTm,
			String resName, String pinyin, String model, String unit,
			String sccj, String remark, Integer stockMax, Integer stockMin,
			Double inPrice, Double outPrice, Double middlePrice,String typeName) {
		this.resid = resid;
		this.typeid = typeid;
		this.resDm = resDm;
		this.resTm = resTm;
		this.resName = resName;
		this.pinyin = pinyin;
		this.model = model;
		this.unit = unit;
		this.sccj = sccj;
		this.remark = remark;
		this.stockMax = stockMax;
		this.stockMin = stockMin;
		this.inPrice = inPrice;
		this.outPrice = outPrice;
		this.middlePrice = middlePrice;
		this.typeName = typeName;
	}
	
	public ResManage(String resid, String typeid, String resDm, String resTm,
			String resName, String pinyin, String model, String unit,
			String sccj, String remark, Integer stockMax, Integer stockMin,
			Double inPrice, Double outPrice, Double middlePrice) {
		this.resid = resid;
		this.typeid = typeid;
		this.resDm = resDm;
		this.resTm = resTm;
		this.resName = resName;
		this.pinyin = pinyin;
		this.model = model;
		this.unit = unit;
		this.sccj = sccj;
		this.remark = remark;
		this.stockMax = stockMax;
		this.stockMin = stockMin;
		this.inPrice = inPrice;
		this.outPrice = outPrice;
		this.middlePrice = middlePrice;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "resid", unique = true, nullable = false, length = 50)
	public String getResid() {
		return this.resid;
	}

	public void setResid(String resid) {
		this.resid = resid;
	}


	@Column(name = "res_dm", length = 100)
	public String getResDm() {
		return this.resDm;
	}

	public void setResDm(String resDm) {
		this.resDm = resDm;
	}

	@Column(name = "res_tm", length = 100)
	public String getResTm() {
		return this.resTm;
	}

	public void setResTm(String resTm) {
		this.resTm = resTm;
	}

	@Column(name = "res_name", length = 100)
	public String getResName() {
		return this.resName;
	}

	public void setResName(String resName) {
		this.resName = resName;
	}

	@Column(name = "pinyin", length = 100)
	public String getPinyin() {
		return this.pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

	@Column(name = "model", length = 100)
	public String getModel() {
		return this.model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	@Column(name = "unit", length = 100)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Column(name = "sccj", length = 100)
	public String getSccj() {
		return this.sccj;
	}

	public void setSccj(String sccj) {
		this.sccj = sccj;
	}

	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "stock_max")
	public Integer getStockMax() {
		return this.stockMax;
	}

	public void setStockMax(Integer stockMax) {
		this.stockMax = stockMax;
	}

	@Column(name = "stock_min")
	public Integer getStockMin() {
		return this.stockMin;
	}

	public void setStockMin(Integer stockMin) {
		this.stockMin = stockMin;
	}

	@Column(name = "in_price", precision = 15)
	public Double getInPrice() {
		return this.inPrice;
	}

	public void setInPrice(Double inPrice) {
		this.inPrice = inPrice;
	}

	@Column(name = "out_price", precision = 15)
	public Double getOutPrice() {
		return this.outPrice;
	}

	public void setOutPrice(Double outPrice) {
		this.outPrice = outPrice;
	}

	@Column(name = "middle_price", precision = 15)
	public Double getMiddlePrice() {
		return this.middlePrice;
	}

	public void setMiddlePrice(Double middlePrice) {
		this.middlePrice = middlePrice;
	}

	@Column(name = "create_by", length = 100)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Transient
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	
	@Column(name = "typeid", length = 100)
	public String getTypeid() {
		return typeid;
	}

	public void setTypeid(String typeid) {
		this.typeid = typeid;
	}
	
}